import numpy as np


# 墨卡托坐标转经纬度坐标
def transf(x, y):
    # x=float(x)
    # y=float(y)
    x = x / 20037508.34 * 180
    y = y / 20037508.34 * 180
    y = 180 / np.pi * (2 * np.arctan(np.exp(y * np.pi / 180)) - np.pi / 2)
    return x, y


x, y = lon * 2, lat / 2
lon = np.array(t['x'])
lat = np.array(t['y'])
lon, lat = transf(lon, lat)
